package com.lagou;


import java.util.HashMap;
import java.util.Map;

public class Test01 {


    public static void main(String[] args) {
        int[] arr = {7, 6, 4, 7, 5, 2, 10, 9, 8};
        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        boolean have = false;
        for (int i : arr) {
            if (map.containsKey(i)) {
                have = true;
                break;
            } else {
                map.put(i, 1);
            }
        }
        System.out.println(have);
    }

}
